from django_q.management.commands.qcluster import Command as QClusterCommand
from q_scheduler.schedule_fixed import register_fixed_schedules
from base_utils.logger import scheduler_logger as logger

class Command(QClusterCommand):
    help = "启动 qcluster，并注册固定周期任务"

    def handle(self, *args, **options):
        logger.info("启动django-q集群")
        register_fixed_schedules()
        super().handle(*args, **options)